# 案例1：过滤掉列表[3, 9, -1, 10, 20, -2, ...] 中的负数
lst1 = [3, 9, -1, 10, 20, -2,7]
nlst = []
for e in lst1:
    if e>=0:
        nlst.append(e)
print(nlst) 

# 案例2：筛出字典{'lisi': 79, 'Jin': 88, 'lucy': 93, ... }中值高于90的项
dct = {'lisi': 79, 'Jin': 88, 'lucy': 93 } 

ks = list(dct.keys()) 
for k in ks:
    if dct[k]>90:
        dct.pop(k) 

print(dct) 

# 案例3：筛出集合{77, 89, 34, 20, 21...}中能被3整除的元素  



